package com.usc.service;

import org.springframework.stereotype.Service;

@Service
public class OrderServiceImp implements OrderService {
    @Override
    public void delete(String name) {
        System.out.println("删除了名字为"+name+"的商品");
    }

    // ... existing code ...
    @Override
    public int add(String name, int number) {
        // 删除或修改这个始终为true的条件判断
        // if (true) {
        //     throw new RuntimeException("添加失败");
        // }
        System.out.println("添加了商品"+name+"数量为"+number);
        return 66;
    }
// ... existing code ...


    @Override

    public String findInfo(String name, int number) {
        return "查询name为"+name+"的商品数量"+number;
    }

}
